//
//  Weight.h
//  iWeighMyself
//
//  Created by Francisco Gindre on 8/4/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>


@interface Weight : NSObject {
	
	
	NSNumber *weightInPounds;
	NSNumber *weightInKilos;
	
	NSDate *dateLogged;
	
	BOOL wasSent;
	
	NSInteger weightID;
	

}


@property (nonatomic,retain,setter=setWeightInPounds) NSNumber *weightInPounds;
@property (nonatomic, retain, setter=setWeightInKilos) NSNumber *weightInKilos;
@property (nonatomic, retain) NSDate *dateLogged;
@property (nonatomic) BOOL wasSent;
@property (nonatomic) NSInteger weightID;

/*
 init the Weight object with all of it attributes
 */
-(id)initWithID:(NSInteger)ID date:(NSDate*)dateWhenLogged weightInKilos:(NSNumber*)kilos weightInPounds:(NSNumber*) pounds isSent:(NSInteger)anIntAsBool;
	
/*
 initializes a Weight object with pounds and date when it was logged
 */


-(id)initWithWeightInPounds:(NSNumber*) pounds date:(NSDate*) dateWhenLogged;


/*
 initializes a Weight object with kilos and date when it was logged
 */

-(id)initWithWeightInKilos:(NSNumber*) kilos date:(NSDate*) dateWhenLogged;

/* 
 converts a number of kilos into pounds
 */
+(NSNumber*)poundsFromKilos:(NSNumber*)kilos;

/* 
 converts a number of pounds into kilos
 
 */
+(NSNumber*)kilosFromPounds:(NSNumber*)pounds;

-(void)setWeightInKilos:(NSNumber *) kilos;

-(void)setWeightInPounds:(NSNumber *) pounds;

/*
 get the unit of the weight in pounds EG: for 45.4 returns 45
 */
-(NSNumber*)getUnitsInPounds;
/*
 get the unit of the weight in pounds EG: for 45.4 returns 4
 */
-(NSNumber*)getDecimalInPounds;
/*
 get the unit of the weight in kilos EG: for 45.4 returns 45
 */
-(NSNumber*)getUnitsInKilos;
/*
 get the unit of the weight in kilos EG: for 45.4 returns 4
 */
-(NSNumber*)getDecimalInKilos;

/*
 set if this weight was sent or not
 */

-(void)setIsSent:(BOOL) isSent;

/*
 get if the weight was sent or not
 */

-(BOOL)wasWeightSent;

/* 
 a weight to a string
 */
-(NSString*)weightToString;

@end
